<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>选课信息</title>
</head>
<body>
<form method="POST" th:action="@{/choose}" th:object="${xk}" >
<div>
      <h1 align="center">选课信息</h1>           
       <div id="specialized">
         <h3>必修:</h3>
           <div th:each="course : ${specialized}">
           <input name="courses" type="checkbox" th:value="${course.id}" />
           <span th:text="${course.name}">COURSE</span><br/>
         </div>
       </div>
   <div  id="optional">
      <h3>选修:</h3>
      <div th:each="course : ${optional}">
        <input name="courses" type="checkbox" th:value="${course.id}" />
        <span th:text="${course.name}">COURSE</span><br/>
      </div>
      </div>
      </div>
        <input class="input" type="submit" value="提交"/>
        </form>
</body>
</html>